package com.aaa.project.zhreport.service;

import com.aaa.project.zhreport.controller.dto.YwfxDataTemplateConfigReqDTO;
import com.aaa.project.zhreport.controller.dto.YwfxDataTemplateConfigResDTO;
import com.aaa.project.zhreport.domain.YwfxDataTemplateConfig;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author baibin
 * @version 1.0
 * @date 2025/4/8 9:52
 * @description YwfxDataTemplateConfigService
 */
public interface YwfxDataTemplateConfigService {

    // 查询所有
    List<YwfxDataTemplateConfig> listPage(YwfxDataTemplateConfig query);

    // 根据 ID 查询
    YwfxDataTemplateConfigResDTO findDetailById(Long id);

    // 插入
    void add(YwfxDataTemplateConfigReqDTO request, HttpServletRequest httpRequest);

    // 更新
    void update(YwfxDataTemplateConfigReqDTO request, HttpServletRequest httpRequest);

    // 删除
    void deleteById(Long id);

    // 启用或禁用
    void enableOrDisable(Long id, String isEnable);

    /**
     * 下载
     *
     * @param id
     * @param type 1 sql数据附件 2 字段附件
     * @param response
     */
    void download(Long id, Integer type, HttpServletResponse response);
}
